﻿/* Author - Anshu Dutta - anshu.dutta@gmail.com
 * This source code is governed by terms and condition of Microsoft Public License (Ms-PL). 
 * Copyright (C)  2011 Anshu Dutta. anshu.dutta@gmail.com
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace RssNewsFeeder.Lib.ViewModel
{
    public abstract class ViewModelBase:INotifyPropertyChanged, IDisposable
    {
        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged!=null)
            {
                PropertyChanged(this,new PropertyChangedEventArgs(propertyName));
            }
        }
                 

        void IDisposable.Dispose()
        {
            OnDispose();
        }

        protected virtual void OnDispose(){}
    }
}
